// pages/more/more.js
const https = require("../../models/home")
const {star} = require("../../utils/index.js")
Page({
  data: {
    lists:""
  },
  onLoad: function (options) {
    var {title,keyword} = options
    wx.setNavigationBarTitle({
      title
    })
    var http = https[keyword]
    http().then(res=>{
      var lists = res.data.result
      lists.forEach(item=>{
        item.star = star(item.raiting)
      })
      this.setData({
        lists
      })
    })
  }
})